home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
PASANS.ZIP
/
CH03_1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-02-04
|
514b
|
26 lines
(* Chapter 3 - Programming exercise 1 *)
program A_Little_Math;
var Index, Count : integer;
Stuff, Thing : real;
begin
Index := 12;
Count := (Index + 4) * (Index - 3);
Writeln('The value of count is now',Count:5);
Stuff := 13.42;
Thing := ((Stuff * Stuff) - 2.456) / (Stuff + 1.3462);
Writeln('The value of thing is now',Thing:10:3);
end.
{ Result of execution
The value of count is now 144
The value of thing is now 12.030
}